home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_item_imp1.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  80 lines

  1. # Jones 3D Cog Script
  2. #
  3. # weap_IMP1.cog
  4. #
  5. # [RT]
  6. #
  7. # Controls Infernal Machine Part #1. Animates gen_sfx_imp1fire.3do.
  8. #
  9. # (C) 1998 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15. message    activated
  16. message    touched
  17. message    taken
  18.  
  19. cog        talkCog                    local
  20.  
  21. sound    foundSnd=Se02j03.wav    local
  22.  
  23. thing    player                    local
  24.  
  25. int        bin=14                    local
  26.  
  27. end
  28.  
  29. # ===================================================================
  30.  
  31. code
  32.  
  33. activated:
  34.  
  35.     StartCutscene(0);
  36.  
  37.     talkCog = GetCogByIndex(0);
  38.     SendMessage(talkCog, 27);
  39.  
  40.     SetExtCamOffset('0.15 -0.05 0.04');
  41.     SetExtCamLookOffset('0.0 0.02 -0.01');
  42.  
  43.     return;
  44.  
  45. # -------------------------------------------------------------------
  46.  
  47. touched:
  48.  
  49.     player = GetSourceRef();
  50.  
  51.     if (GetInv(player, bin) < GetInvMax(player, bin))
  52.     {
  53.         TakeItem(GetSenderRef(), player);
  54.     }
  55.     else
  56.     {
  57.         EndCutscene();
  58.     }
  59.     
  60.     return;
  61.  
  62. # -------------------------------------------------------------------
  63.  
  64. taken:
  65.  
  66.     player = GetSourceRef();
  67.  
  68.     ChangeInv(player, bin, 1.0);
  69.     SetInvAvailable(player, bin, 1);
  70.     JonesInvItemChanged(bin);
  71.  
  72.     Sleep(1.0);
  73.     PlayVoice(player, foundSnd, 1.0, 0);
  74.  
  75.     EndCutscene();
  76.  
  77.     return;
  78.  
  79. end
  80.